#include<bits/stdc++.h>
using namespace std;

int solution(vector<int> nums)
{
	sort(nums.begin(), nums.end());
	priority_queue<int, vector<int>, greater<int>> q;
	for(int i = 1;i < nums.size();i++)
		q.push(nums[i]-nums[i-1]);
	int a = q.top();
	if(!a)
		return nums.size();
	q.pop();
	int b = q.top();
	return (nums.back()-nums.front())/__gcd(a, b)+1;
}

int main()
{
	int n, x;
	cin>>n;
	vector<int> nums;
	while(n--)
	{
		cin>>x;
		nums.push_back(x); 
	}
	cout<<solution(nums);
	return 0;
}

